# Maintainer:
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: PedsXing <pedsxing at gmx dot net>

pkgname=vc
pkgver=1.4.0
pkgrel=1
pkgdesc="A library to ease explicit vectorization of C++ code"
url='https://github.com/VcDevel/Vc'
arch=(x86_64)
license=(LGPL3)
makedepends=(cmake)
source=("https://github.com/VcDevel/Vc/releases/download/$pkgver/Vc-$pkgver.tar.gz")
sha256sums=('e6cfc056eb3a72a57751e768ba63236ebf2711d267fbd1dc0acfee0ac16fdf68')

prepare() {
  mkdir -p build
}

build() {
  cd build
  cmake ../Vc-$pkgver \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DTARGET_ARCHITECTURE=generic
  make
}

package() {
  cd build
  make DESTDIR="$pkgdir" install
}
